<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<!--                                                               -->
<!-- Consider inlining CSS to reduce the number of requested files -->
<!--                                                               -->
<link type="text/css" rel="stylesheet" href="DStation.css">

<!--                                           -->
<!-- Any title is fine                         -->
<!--                                           -->
<title>Diagnostic Station Homepage</title>

<!--                                           -->
<!-- This script loads your compiled module.   -->
<!-- If you add any GWT meta tags, they must   -->
<!-- be added before this line.                -->
<!--                                           -->
<script src="dstation.DStation/dstation.DStation.nocache.js"></script>
</head>
<body>
	<table>
	<tr>
	<td valign="top"><img src="sidebar.PNG"/></td>
	<td valign="top">
	<h1>Diagnostic Station Homepage</h1>
	<table>
		<c:if test="${!(empty widgetList)}">
			<c:forEach var="widget" items="${widgetList}">
				<tr>
					<td id="${widget.id}" title="${widget.title}" style="width:900px"></td>
				</tr>
			</c:forEach>
		</c:if>
		<c:if test="${!empty cam }">
			<tr>
				<td style="height:100px">
					<h2>Here's who is in RoboClub!</h2>
				</td>
			</tr>
			<tr>
				<td>
				<img src="http://roboclub8.frc.ri.cmu.edu/main.jpg?" alt="roboclub webcam" name="main" width="100%">
				<script type="text/javascript"> 	
					function reloadImage() { 		
						document.images.main.src = 'http://roboclub8.frc.ri.cmu.edu/main.jpg?'+ (new Date()).getTime(); 		 			
					} 	
					setInterval('reloadImage()',2000); 	
				</script>
				</td>
			</tr>
		</c:if>
		<c:if test="${!(empty arr)}">
			<script type="text/javascript" src="../../amline/swfobject.js"></script>
			<tr>
				<td style="height:100px">
					<h3>Colony Diagnostic Data Display</h3>
				</td>
			</tr>
			<tr>
				<td id="flashcontent" style="height:600px">
					<strong>Please upgrade your Flash Player</strong>
				</td>
			${jscrip}
			</tr>
			<c:forEach var="test" items="${testcolors}">
				<tr>
					<td>Test UID ${test.id} is ${test.color}</td>
				</tr>
			</c:forEach>
		</c:if>
		</td>
		</tr>
	</table>
	</table>
</body>
</html>